package com.xmtlxx.system.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.domain.entity.SysArea;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.system.domain.bo.SysAreaBo;
import com.xmtlxx.system.domain.vo.SysAreaVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 行政区划管理Mapper接口
 *
 * @author xmtlxx
 * @date 2022-04-28
 */
public interface SysAreaMapper extends BaseMapperPlus<SysAreaMapper, SysArea, SysAreaVo> {
    /**
     * 根据条件分页查询行政区划管理
     *
     * @param sysAreaBo 行政区划管理
     * @return Page SysArea
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    Page<SysArea> selectPageSysAreaList(@Param("page") Page<SysArea> page,@Param("sysArea") SysAreaBo sysArea);

    /**
     * 查询行政区划管理列表
     *
     * @param sysAreaBo 行政区划管理
     * @return 行政区划管理集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    List<SysArea> selectSysAreaList(@Param("sysArea") SysAreaBo sysArea);

}
